<?php
    ####################################################
    # library import and object instance.              #
    ####################################################
    include_once('./common.php');
    include_once('./app_common.php');


    ####################################################
    # request data($_POST AND $_GET FROM $_REQUEST)    #
    ####################################################
    # REQUEST(get and post variables)
    $req = Request::clean_request($_REQUEST, FALSE);

    # GET(url variables)

    # POST(form variables)

    # Validation(special case validate)
    //*/
    #@@todo : php server validation
    Validation::check_isnt_key_val($req, 'fuid');
    Validation::check_is_emptys($req);
    //*/

    ####################################################
    # implementation                                   #
    ####################################################

    //*/
    $article = $db->get(
        sprintf("SELECT * FROM `%s` WHERE `%s`= '%s'",
            $ncrud['table_name'],
            'fuid',
            $req['fuid']
        )
    );
    //*/
?>
<?php
    $html->custom_header(TITLE);
    $html->custom_js("{$JS}jquery.1.7.1.min.js");
    $html->custom_js("{$JS}lib.control.js");
    $html->custom_css("{$CSS}basic.css");
?>
<?$html->custom_body();?>
<?=$tmp->tiles_header()?>
<h1>app - retrieve</h1>
        <table width="100%" border="1" cellspacing="0" cellpadding="3" style="border-collapse:collapse">
            <tr>
                <th>
                    fuid
                </th>
                <td>
                    <?=StrFormat::element($article['res'][fuid])?>
                </td>
            </tr>
            <tr>
                <th>
                    name
                </th>
                <td>
                    <?=StrFormat::element($article['res'][name])?>
                </td>
            </tr>
            <tr>
                <th>
                    name_eng
                </th>
                <td>
                    <?=StrFormat::element($article['res'][name_eng])?>
                </td>
            </tr>
            <tr>
                <th>
                    enable
                </th>
                <td>
                    <?=StrFormat::element($article['res'][enable])?>
                </td>
            </tr>
            <tr>
                <th>
                    description
                </th>
                <td>
                    <?=StrFormat::element($article['res'][description])?>
                </td>
            </tr>
        </table>
    <?=NTool::btn("update", "Mover.href('./app_update.php?fuid={$article['res']['fuid']}');")?>
    <?=NTool::btn("delete", "Mover.href('./app_delete.php?fuid={$article['res']['fuid']}');")?>
    <?=NTool::btn("list", "Mover.href('./app_list.php');");?>
    <span> | </span>
    <?=NTool::btn("back", "Mover.back();");?>
    <?=NTool::btn("index", "Mover.home();");?>
<?=$tmp->tiles_footer()?>
<?php $html->html_footer(); ?>

